<template>
  <div>
    <div class="title">当前位置</div>
    <!-- 注册一个点击事件 -->
    <div class="des" @click="$emit('click')">
      <i class="fa fa-location-arrow"></i>
      <span>{{ address }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: "location",
  props: {
    address: String,
  },
};
</script>

<style scoped>
.title {
  margin: 10px 5px;
  font-size: 12px;
}
.des i {
  font-size: 20px;
  padding-left: 5px;
  color: #009eef;
}
.des span {
  color: #333;
  font-weight: bold;
  margin-left: 5px;
  display: inline-block;
  width: 90%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
</style>